home *** CD-ROM | disk | FTP | other *** search
/ Freelog 121 / FreelogMagazineJuilletAout2014-No121.iso / Outils / Adobe-Air / adobe-air_13.exe / [0] / setup.swf / scripts / mx / containers / utilityClasses / ApplicationLayout.as next >
Text File  |  2014-03-27  |  2KB  |  65 lines

  1. package mx.containers.utilityClasses
  2. {
  3.    import mx.core.Container;
  4.    import mx.core.IFlexDisplayObject;
  5.    import mx.core.mx_internal;
  6.    
  7.    use namespace mx_internal;
  8.    
  9.    public class ApplicationLayout extends BoxLayout
  10.    {
  11.       
  12.       mx_internal static const VERSION:String = "3.0.0.0";
  13.        
  14.       
  15.       public function ApplicationLayout()
  16.       {
  17.          super();
  18.       }
  19.       
  20.       override public function updateDisplayList(param1:Number, param2:Number) : void
  21.       {
  22.          var _loc4_:Number = NaN;
  23.          var _loc5_:Number = NaN;
  24.          var _loc6_:Number = NaN;
  25.          var _loc7_:Number = NaN;
  26.          var _loc8_:int = 0;
  27.          var _loc9_:int = 0;
  28.          var _loc10_:IFlexDisplayObject = null;
  29.          super.updateDisplayList(param1,param2);
  30.          var _loc3_:Container = super.target;
  31.          if(_loc3_.horizontalScrollBar && getHorizontalAlignValue() > 0 || _loc3_.verticalScrollBar && getVerticalAlignValue() > 0)
  32.          {
  33.             _loc4_ = _loc3_.getStyle("paddingLeft");
  34.             _loc5_ = _loc3_.getStyle("paddingTop");
  35.             _loc6_ = 0;
  36.             _loc7_ = 0;
  37.             _loc8_ = _loc3_.numChildren;
  38.             _loc9_ = 0;
  39.             while(_loc9_ < _loc8_)
  40.             {
  41.                if((_loc10_ = IFlexDisplayObject(_loc3_.getChildAt(_loc9_))).x < _loc4_)
  42.                {
  43.                   _loc6_ = Math.max(_loc6_,_loc4_ - _loc10_.x);
  44.                }
  45.                if(_loc10_.y < _loc5_)
  46.                {
  47.                   _loc7_ = Math.max(_loc7_,_loc5_ - _loc10_.y);
  48.                }
  49.                _loc9_++;
  50.             }
  51.             if(_loc6_ != 0 || _loc7_ != 0)
  52.             {
  53.                _loc9_ = 0;
  54.                while(_loc9_ < _loc8_)
  55.                {
  56.                   _loc10_ = IFlexDisplayObject(_loc3_.getChildAt(_loc9_));
  57.                   _loc10_.move(_loc10_.x + _loc6_,_loc10_.y + _loc7_);
  58.                   _loc9_++;
  59.                }
  60.             }
  61.          }
  62.       }
  63.    }
  64. }
  65.